import {
  request
} from './request';

export function getDetailInfo(iid) {
    console.log(iid)
  return request({
    url: '/detail',
    params: {
      iid
    }
  })
}

export function Recommend(){
  return request({
    url: '/recommend'
  })
}

export class Goods {
  constructor(itemInfo, columns, service) {
    this.desc = itemInfo.desc
    this.price = itemInfo.lowNowPrice
    this.oldPrice = itemInfo.lowPrice
    this.discountDesc = itemInfo.discountDesc
    this.title = itemInfo.title
    this.columns = columns
    this.service = service

  }
}

export class ShopInfo {
  constructor(shopInfo, detailInfo) {
    this.name = shopInfo.name
    this.shopLogo = shopInfo.shopLogo
    this.type = shopInfo.type
    this.shopId = shopInfo.shopId
    this.nonsupportReasonRefound = shopInfo.nonsupportReasonRefound
    this.score = shopInfo.score
    this.cFans = shopInfo.cFans
    this.cGoods = shopInfo.cGoods
    this.cSells = shopInfo.cSells,
    this.desc = detailInfo.desc
    this.detailImage = detailInfo.detailImage
  }

}



export class DetailInfo{
  constructor(detailInfo){
    this.desc = detailInfo.desc
    this.detailImage = detailInfo.detailImage
  }
}